<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
	<?php
	
require_once("../conn/conn_db.php");   //包含数据库连接文件
if( $_GET["c_id"]!="")
{
    $cid = $_GET["c_id"];  
    $sql = "delete from comment where c_id=".$cid;  //删除语句
    $delete = $conn->query($sql); //执行SQL语句
    if($delete)         //判断执行结果
    {
        echo "<script>alert('评论删除成功！');self.location='../comment_info.php'</script>";
    }
    else
    {
        echo "<script>alert('评论删除失败！');self.location='../comment_info.php'</script>";
    }
}
else
{
    echo "<script>alert('请选择要删除的评论！');self.location='../comment_info.php'</script>";
}
?>
</body>
</html>